<?php

	//include the RainTPL class
	include "inc/rain.tpl.class.php";

	//initialize a Rain TPL object
	$tpl = new RainTPL( 'tpl' );
	
	//variable assign example
	$variable = "Hello World!";
	$tpl->assign( "variable", $variable );
	
	//loop example
	$week = array( 'Monday', 'Tuersday', 'Wednesday', 'Friday', 'Saturday', 'Sunday' );
	$tpl->assign( "week", $week );
	
	
	//loop example 2
	$user = array(  0 => array( 'name'=>'Sheska', 'age'=>19 ),
					1 => array( 'name'=>'Shoun', 'age'=>45 ),
					2 => array( 'name'=>'Federico', 'age'=>27 ),
	);
	$tpl->assign( "user", $user );
	
	
	//assign the template variable copyright
	$tpl->assign( 'copyright', 'Copyright 2006 - 2010 Rain TPL<br>Project By <a href="http://www.federicoulfo.it" target="_blank">Federico Ulfo . it</a>' );

	//draw the template	
	echo $tpl->draw( 'page' );
	
	
?>